import request from '@/utils/request'

// 查询文档列表
export function listDocument(query) {
  return request({
    url: '/knowledge/document/list',
    method: 'post',
    data: query
  })
}

// 查询文档详细
export function getDocument(documentId) {
  return request({
    url: '/knowledge/document/get',
    method: 'post',
    params: {
      id: documentId
    }
  })
}

// 新增文档
export function addDocument(data) {
  return request({
    url: '/knowledge/document/add',
    method: 'post',
    data: data
  })
}

// 修改文档
export function updateDocument(data) {
  return request({
    url: '/knowledge/document/edit',
    method: 'post',
    data: data
  })
}

// 删除文档
export function delDocument(documentId) {
  return request({
    url: '/knowledge/document/remove',
    method: 'post',
    data: documentId
  })
}
